import java.util.Scanner;

public class Text19092304 {
public static void main(String[] args) {
	Scanner scanner=new Scanner(System.in);
	int n,m,a;
	n=scanner.nextInt();
	m=scanner.nextInt();
	a=scanner.nextInt();
	int sum=0;
	sum=n/a*m/a;
	System.out.println(sum);
	scanner.close();
}
}
